import { setStorage } from '../utils/storage'

export default {
  namespaced: true, // 开启命名空间
  state () {
    return {
      refresh_token: '',
      token: ''
    }
  },
  mutations: {
    setRefreshToken (state, refreshToken) {
      state.refresh_token = refreshToken
      setStorage('refresh_token', refreshToken)
    },
    setToken (state, token) {
      state.token = token
      setStorage('token', token)
    }
  },
  actions: {
  },
  modules: {
  }
}
